import request from '@/utils/request';

/**
 * 登录模块
 */

interface IResponseType<data = {}> {
    code?: number
    status: number
    msg: string
    data: data
}
interface ILogin {
    token: string
    expires: number
}
export const login = (username: string, password: string) => {
    return request<IResponseType<ILogin>>({
        url: '/api/auth/login',
        method: 'post',
        data: {
            username,
            password,
        },
    })
}